// src/router/index.ts
import { createRouter, createWebHashHistory } from "vue-router"; // 修改这里
import Home from "../view/home/index.vue";

export const routeArray = [
  {
    path: "/home",
    name: "主页",
    component: () => import("../view//home//pages//home/index.vue"),
    icon: `<svg t="1738070655315" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8106" width="256" height="256"><path d="M898.5 255.6L568.4 76.4c-35.3-19.2-77.6-19.2-112.9 0l-330 179.2C86.4 276.8 62 318.2 62 363.3v476.6C62 907.3 115.7 962 181.9 962H842c66.2 0 119.9-54.7 119.9-122.1V363.3c0.1-45.1-24.3-86.5-63.4-107.7zM872 809.3c0 33.7-26.9 61.1-60 61.1H212c-33.1 0-60-27.3-60-61.1V369.5c0-22.6 12.2-43.3 31.8-53.9l300-162.9c17.6-9.6 38.8-9.6 56.5 0l300 162.9c19.6 10.6 31.8 31.3 31.8 53.9v439.8z" fill="#707070" p-id="8107"></path><path d="M677 687.1H347c-24.8 0-45 20.6-45 45.8s20.2 45.8 45 45.8h330c24.8 0 45-20.6 45-45.8s-20.2-45.8-45-45.8z" fill="#707070" p-id="8108"></path></svg>`,
  },
  {
    path: "/reserve",
    name: "预订页面",
    component: () => import("../view/home/pages/reserve/index.vue"),
    icon: '<svg t="1738122194256" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2885" width="256" height="256"><path d="M845.813 91.92h-59.65c-10.882-36.861-45.033-63.84-85.373-63.84H323.21c-40.34 0-74.491 26.98-85.372 63.841h-59.651C113.019 91.92 60 144.939 60 210.108v667.625c0 65.169 53.019 118.188 118.187 118.188h667.625c65.169 0 118.188-53.019 118.188-118.188V210.108c0-65.169-53.019-118.188-118.187-118.188zM294.21 117.08c0-15.991 13.009-29 29-29h377.58c15.99 0 29 13.009 29 29v9.682c0 15.991-13.01 29-29 29H323.21c-15.99 0-29-13.009-29-29v-9.682zM904 877.733c0 32.085-26.103 58.188-58.188 58.188H178.187c-32.084 0-58.187-26.103-58.187-58.188V210.108c0-32.084 26.103-58.188 58.187-58.188h59.65c10.881 36.861 45.033 63.841 85.373 63.841h377.58c40.34 0 74.492-26.98 85.373-63.841h59.649c32.085 0 58.188 26.103 58.188 58.188v667.625z" p-id="2886" fill="#707070"></path><path d="M425.954 651.898L318.449 544.394l-42.427 42.425 149.932 149.933 322.024-322.023-42.426-42.427z" p-id="2887" fill="#707070"></path></svg>',
  },
  {
    path: "/activity",
    name: "活动页",
    component: () => import("../view/home/pages/activity/index.vue"),
    icon: '<svg t="1738070759057" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10037" width="256" height="256"><path d="M512 60.8l118.4 243.2 19.2 41.6 48 6.4 265.6 38.4-195.2 192-32 32 6.4 44.8 44.8 268.8-233.6-124.8L512 787.2l-41.6 22.4-233.6 124.8 44.8-268.8L288 620.8l-32-32-195.2-192 265.6-38.4 48-6.4 19.2-41.6L512 60.8M512 0c-28.8 0-54.4 16-67.2 41.6l-115.2 240L64 323.2c-28.8 3.2-51.2 22.4-57.6 48-9.6 25.6-3.2 54.4 16 73.6L217.6 640l-44.8 272c-3.2 28.8 6.4 54.4 28.8 70.4C214.4 988.8 230.4 992 243.2 992c12.8 0 25.6-3.2 35.2-9.6l233.6-124.8 233.6 124.8c9.6 6.4 22.4 9.6 35.2 9.6 16 0 28.8-3.2 41.6-12.8 22.4-16 35.2-44.8 28.8-70.4L806.4 640l195.2-195.2c19.2-19.2 25.6-48 16-73.6-9.6-25.6-32-44.8-57.6-48l-265.6-38.4-115.2-240C566.4 16 540.8 0 512 0L512 0z" p-id="10038" fill="#707070"></path></svg>',
  },
  {
    path: "/forum",
    name: "论坛页",
    component: () => import("../view/home/pages/forum/index.vue"),
    icon: '<svg t="1738070793318" class="icon" viewBox="0 0 1136 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11300" width="256" height="256"><path d="M1079.168215 0 511.184944 0c-31.23908 0-56.798327 25.559247-56.798327 56.798327l0 113.596654L113.596654 170.394981c-62.47816 0-113.596654 51.118494-113.596654 113.596654l0 454.386617c0 62.47816 51.118494 113.596654 113.596654 113.596654l59.638243 0c17.039498 0 25.559247 11.359665 22.719331 28.399164l-14.199582 76.677742c-11.359665 62.47816 22.719331 85.197491 76.677742 51.118494l207.313894-124.95632c28.399164-17.039498 73.837825-28.399164 105.076905-28.399164l227.193308 0c62.47816 0 113.596654-51.118494 113.596654-113.596654l0-193.114312 0 0 19.879414 14.199582C979.771143 596.382435 1022.369888 573.663104 1022.369888 511.184944l0 28.399164c0-14.199582 11.359665-28.399164 28.399164-28.399164l28.399164 0c31.23908 0 56.798327-25.559247 56.798327-56.798327L1135.966542 56.798327C1135.966542 25.559247 1110.407295 0 1079.168215 0zM851.974907 738.378252c0 31.23908-25.559247 56.798327-56.798327 56.798327l-241.39289 0c-31.23908 0-79.517658 14.199582-105.076905 31.23908l-184.594563 116.436571c-14.199582 8.519749-22.719331 2.839916-17.039498-11.359665L264.112221 851.974907c5.679833-31.23908-14.199582-56.798327-45.438662-56.798327L113.596654 795.17658c-31.23908 0-56.798327-25.559247-56.798327-56.798327L56.798327 283.991636c0-31.23908 25.559247-56.798327 56.798327-56.798327l681.579925 0c31.23908 0 56.798327 25.559247 56.798327 56.798327L851.974907 738.378252zM1079.168215 425.987453c0 17.039498-11.359665 28.399164-28.399164 28.399164l-28.399164 0c-31.23908 0-56.798327 25.559247-56.798327 56.798327l0-17.039498c0 17.039498-11.359665 22.719331-22.719331 14.199582L908.773234 485.625697l0 0L908.773234 283.991636c0-62.47816-51.118494-113.596654-113.596654-113.596654L511.184944 170.394981 511.184944 85.197491c0-14.199582 14.199582-28.399164 28.399164-28.399164l511.184944 0c14.199582 0 28.399164 14.199582 28.399164 28.399164L1079.168215 425.987453z" fill="#707070" p-id="11301"></path><path d="M539.584108 567.983271 198.794145 567.983271c-17.039498 0-28.399164 11.359665-28.399164 28.399164 0 17.039498 14.199582 28.399164 28.399164 28.399164l340.789963 0c17.039498 0 28.399164-11.359665 28.399164-28.399164C567.983271 579.342937 553.783689 567.983271 539.584108 567.983271z" fill="#707070" p-id="11302"></path><path d="M709.979089 397.58829 198.794145 397.58829c-14.199582 0-28.399164 11.359665-28.399164 28.399164 0 17.039498 11.359665 28.399164 28.399164 28.399164l511.184944 0c14.199582 0 28.399164-11.359665 28.399164-28.399164C738.378252 408.947955 727.018587 397.58829 709.979089 397.58829z" fill="#707070" p-id="11303"></path></svg>',
  },
  {
    path: "/mailbox",
    name: "邮箱",
    component: () => import("../view/home/pages/mailbox/index.vue"),
    icon: '<svg t="1738070852051" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12382" width="256" height="256"><path d="M879.430882 178.6314 144.567072 178.6314c-42.85197 0-77.733409 34.881438-77.733409 77.67815l0 511.272429c0 42.906206 34.881438 77.787644 77.733409 77.787644l734.86381 0c42.852994 0 77.733409-34.881438 77.733409-77.787644L957.164291 256.30955C957.164291 213.512838 922.283876 178.6314 879.430882 178.6314zM512.818133 567.18895l-351.655082-336.698438L859.560322 230.490511 512.818133 567.18895zM879.430882 793.511535 144.567072 793.511535c-14.302751 0-25.875321-11.627828-25.875321-25.929556L118.691751 264.116353 492.947574 622.541629c5.240351 5.021364 11.901051 7.479345 18.560728 7.479345 4.256954 0 8.295943-1.309832 12.117992-3.275603 4.095271-1.201361 8.024767-3.00238 11.244089-6.16849L905.305179 260.894985l0 506.685971C905.305179 781.882684 893.733633 793.511535 879.430882 793.511535z" fill="#707070" p-id="12383"></path></svg>',
  },
  {
    path: "/notice",
    name: "公告页",
    component: () => import("../view/home/pages/notice/index.vue"),
    icon: '<svg t="1738070880937" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13636" width="256" height="256"><path d="M844.8 102.4c-4.096-2.56-9.216-3.584-13.824-2.048L131.584 355.328h-48.64c-23.552 0-40.96 10.752-53.248 19.968l-1.536 1.536-2.56 2.56c-18.944 14.848-25.6 40.96-25.6 58.88v109.056c0 22.528 9.728 43.008 25.6 55.808 15.872 15.36 36.352 24.064 57.344 24.064h51.712l65.024 25.088c1.024 3.072 2.56 6.144 5.632 8.192l-6.656 18.944c-11.776 35.84-10.752 70.144 4.096 99.328 11.776 30.208 38.4 54.272 73.216 66.048l197.632 71.68c14.848 5.632 29.696 8.192 44.544 8.192 17.92 0 35.84-4.096 52.224-12.288 35.328-17.408 58.368-41.984 68.608-72.704l8.192-20.48 184.32 66.56c4.608 1.536 9.728 1.024 13.824-2.048 4.096-2.56 6.144-7.168 6.144-12.288V114.688c-0.512-4.608-2.56-9.216-6.656-12.288z m-233.984 726.528c-7.68 23.04-26.112 41.984-53.76 56.32-22.528 11.264-48.128 12.288-73.216 2.56l-198.144-71.68c-27.136-9.216-47.104-26.624-55.296-49.152 0-0.512-0.512-1.024-0.512-1.536-11.264-22.528-12.288-48.64-2.56-76.8l6.656-17.92 386.048 137.728-7.68 19.456c-1.536 0.512-1.536 1.024-1.536 1.024z m210.432 20.992l-155.136-56.32s-0.512 0-0.512-0.512l-12.288-4.608-9.216-3.584h-0.512l-402.432-143.36c-1.536-4.096-4.608-7.68-8.704-9.728l-88.576-34.304c-1.536-0.512-3.584-1.024-5.12-1.024H82.944c-13.824 0-26.624-5.632-37.376-15.872l-1.536-1.536c-9.216-6.656-14.336-18.944-14.336-32.256V438.272c0-14.336 6.144-29.696 14.336-35.84l1.536-1.536 2.56-2.56c12.8-9.728 23.04-13.312 34.304-13.312h51.2c1.536 0 3.584-0.512 5.12-1.024l681.984-248.32V849.92z" p-id="13637" fill="#707070"></path><path d="M238.08 438.784c1.536 0 3.584-0.512 5.12-1.024l512-186.368c7.68-3.072 11.776-11.264 8.704-18.944-2.56-7.68-11.264-11.776-18.944-8.704L232.96 409.6c-7.68 3.072-11.776 11.264-8.704 18.944 2.048 6.656 7.68 10.24 13.824 10.24zM907.264 336.896c-4.608-2.048-9.728-1.536-13.824 1.536-4.096 2.56-6.656 7.168-6.656 12.288v322.56c0 5.12 2.56 9.728 6.656 12.288 2.56 1.536 5.632 2.56 8.192 2.56 2.048 0 4.096-0.512 5.632-1.024C977.92 657.408 1024 588.8 1024 512s-46.08-145.408-116.736-175.104z m9.216 312.32V374.784c48.128 28.672 77.824 79.872 77.824 137.216s-30.208 108.544-77.824 137.216z" p-id="13638" fill="#707070"></path></svg>',
  },
];

const routes = [
  {
    path: "/",
    name: "首页",
    component: Home,
    redirect: { path: "/home" }, // 重定向到第一个子路由
    children: [...routeArray],
  },
  // 添加更多路由
];

const router = createRouter({
  history: createWebHashHistory(), // 修改这里
  routes,
});

export default router;
